package com.nmgsr.nettools.net.retrofit;
/**
 *
 * 适用于  Retrofit 返回的数据结构，不带items的数据，直接返回在result中的数据
 */

public class BaseResponse<T> {
    private int code;
    private String type;
    private String message;
    private T result;
    private Object extras;
    private String time;

    // Getter 和 Setter 方法
    public boolean isSuccess() {
        return code == 200; // 根据实际业务码调整
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public Object getExtras() {
        return extras;
    }

    public void setExtras(Object extras) {
        this.extras = extras;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}
